package com.candy.candygateway.config;

import com.alibaba.nacos.api.naming.pojo.Instance;
import com.alibaba.nacos.client.naming.core.Balancer;

import java.util.List;

/**
 * @author suYanLong
 * @version 1.0
 * @date 2023/8/17 9:56
 * @Description 描述
 */
public class WeightedBalancer extends Balancer {

    public static Instance chooseInstanceByRandomWeight(List<Instance> instanceList) {
        // 这是父类Balancer自带的根据随机权重获取服务的方法.
        return getHostByRandomWeight(instanceList);
    }

}
